package com.project.bean;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 回帖实体类
 */
public class ReplyBean {
//    回帖id
    private Integer id;
//    回帖内容
    private String replyContent;
//    回帖人
    private UserBean user;
//    回帖的主贴
    private PostBean post;

//    回帖时间
    private LocalDate date = LocalDate.now();

    public ReplyBean(){}

    public ReplyBean(String replyContent, Integer user, Integer post) {
        this.replyContent = replyContent;
        this.user = new UserBean();
        this.user.setId(user);
        this.post = new PostBean();
        this.post.setId(post);

    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getReplyContent() {
        return replyContent;
    }

    public void setReplyContent(String replyContent) {
        this.replyContent = replyContent;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public PostBean getPost() {
        return post;
    }

    public void setPost(PostBean post) {
        this.post = post;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "ReplyBean{" +
                "id=" + id +
                ", replyContent='" + replyContent + '\'' +
                ", user=" + user +
                ", post=" + post +
                ", date=" + date +
                "}\n";
    }
}
